package cn.iocoder.yudao.module.brokerage.level.pojo.vo;

import cn.iocoder.yudao.framework.business.basic.pojo.bo.TemplateParameter;
import cn.iocoder.yudao.framework.business.basic.pojo.dto.SaveDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

@Schema(description = "推广人员等级保存 Request VO")
@Data
public class AdminBrokerageLevelSaveDTO extends SaveDTO {

    @Schema(description = "类型：0-普通用户、1-会员、2-招商人员、3-商家", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    @NotNull(message = "类型不能为空")
    private Integer type;

    @Schema(description = "名称，如会员等级：普通会员、黑铁会员、青铜会员、白银会员、黄金会员、铂金会员")
    @NotBlank(message = "名称不能为空")
    private String name;

    @Schema(description = "说明")
    private String introduction;

    @Schema(description = "升级方式：0-不自动升级、1-满足任意条件、2-满足全部条件")
    private Integer upWay;

    @Schema(description = "升级配置，JSON格式，如：[{\"name\":\"直推人数\",\"key\":\"invite_count\",\"value\":\"100\"}]")
    private List<TemplateParameter> config;

    @Schema(description = "权益配置，JSON数组，如：[{\"name\":\"享受直推会员费的10%\",\"key\":\"buy_vip_father_percent\",\"value\":\"10\"}]")
    private List<TemplateParameter> benefits;

}